<?php
	//----------------------- INPUT ELEMENTS -------------------//
	$selectLanguages= $this->Item['lang_code'];
	$name 			= $this->Item['name'];
	$picture 		= '';
	if($this->Item['picture'] != ''){
		$picture	= '<img src="' . $this->Item['picture'] . '" style="width:100px;">';
	}
	$status 		= $this->Item['status'];
	if($status == 1){
		$status = $this->cmsIconButton('Đang được hiển thị', $this->imgUrl . '/admin/tick.png');
	}else{
		$status = $this->cmsIconButton('Đã tắt hiển thị', $this->imgUrl . '/admin/publish_x.png');
	}
	$order 			= $this->Item['order'];
	$parents		= $this->Item['parents'];
	$content 		= htmlspecialchars_decode($this->Item['content']);

	$arrInput = array(
				array('label' => 'Chọn ngôn ngữ','input' => $selectLanguages),
				array('label' => 'Tên danh mục','input' => $name),
				array('label' => 'Hình ảnh','input' => $picture),
				array('label' => 'Thuộc danh mục','input' => $parents),
				array('label' => 'Hiển thị','input' => $status),
				array('label' => 'Thứ tự','input' => $order),
				array('label' => 'Nội dung','input' => $content, 'style' => 'margin-top: 25px;'),
			);

	$meta_title = $this->Item['meta_title'];
	$meta_description = $this->Item['meta_description'];
	$meta_keywords = $this->Item['meta_keywords'];
	
	$arrMeta = array(
		array('label' => 'Meta Title','input' => $meta_title),
		array('label' => 'Meta Description','input' => $meta_description),
		array('label' => 'Meta Keywords','input' => $meta_keywords),
	);
	
	//-------------------- SESSAGES ERROR ------------------
	if(count($this->messageError)>0){
		$errors = $this->formErrors($this->messageError,array('id'=>'errors'));
	}
?>
<form name="appForm" method="post" action="" enctype="multipart/form-data">
	<?php echo $this->render('admin-menu/toolbar/index.php');?>
 	<div class="clr"></div>
	<?php echo $this->render('admin-menu/sublink/index.php');?>
	<?php echo $errors;?>

	<!-- BEGIN: CONTENT -->
	<div class="app_content goc10">
		<div class="width-60 fl">
			<fieldset class="adminform">
				<legend>Chi tiết</legend>
				<table class="adminformlist">
					<?php echo $this->partialLoop('row.php', $arrInput);?>
				</table>
			</fieldset>
		</div>
		<div class="width-40 fr">

			<div id="pane-sliders" class="pane-sliders">
				<div class="panel">
					<h3 id="metadata-options" class="title pane-toggler-down"><a href="javascript:void(0);"><span>Metadata Options</span></a></h3>
					<div class="panel_content">
						<fieldset class="panelform">
							<table class="panelformlist">
								<?php echo $this->partialLoop('row.php', $arrMeta);?>
							</table>
						</fieldset>
					</div>
				</div>
				
			</div>
		</div>
		<div class="clr"></div>
	</div>
	<!-- END: 	CONTENT -->
</form>